package com.yuyang.wifi.views.recyclerview.model;

import android.view.View;

import com.yuyang.wifi.views.recyclerview.swipe.SwipeRefreshTrigger;
import com.yuyang.wifi.views.recyclerview.swipe.SwipeTrigger;


/**
 * Created by tik on 17/8/15.
 */

public class RefreshHeaderItem extends SimpleItem {
	protected SwipeRefreshTrigger mSwipeRefreshTrigger;
	protected SwipeTrigger mSwipeTrigger;

	public RefreshHeaderItem() {
	}

	public RefreshHeaderItem(View view, int height) {
		super(view, height);
	}

	public RefreshHeaderItem(View view) {
		super(view);
	}

	public void init(Object view){
		if (view instanceof SwipeRefreshTrigger){
			mSwipeRefreshTrigger = (SwipeRefreshTrigger) view;
		}
		if (view instanceof SwipeTrigger){
			mSwipeTrigger = (SwipeTrigger) view;
		}
	}

	public SwipeRefreshTrigger getSwipeRefreshTrigger() {
		return mSwipeRefreshTrigger;
	}

	public void setSwipeRefreshTrigger(SwipeRefreshTrigger swipeRefreshTrigger) {
		mSwipeRefreshTrigger = swipeRefreshTrigger;
	}

	public SwipeTrigger getSwipeTrigger() {
		return mSwipeTrigger;
	}

	public void setSwipeTrigger(SwipeTrigger swipeTrigger) {
		mSwipeTrigger = swipeTrigger;
	}
}
